package com.mobile.service.dto;

import com.mobile.service.dto.base.BaseDTO;
import com.mobile.service.dto.base.PageDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

// User DTO
@EqualsAndHashCode(callSuper = true)
@Data
public class UserDTO extends BaseDTO {
    @Schema(description = "用户代码")
    private String userCode;
    @Schema(description = "工号")
    private String jobNo;
    @Schema(description = "职位ID")
    private String positionId;
    @Schema(description = "用户名")
    private String userName;
    @Schema(description = "用户性别")
    private String userSex;
    @Schema(description = "部门ID")
    private Integer organizationId;
    @Schema(description = "用户密码")
    private String userPassword;
    @Schema(description = "手机号码")
    private String mobilePhone;
    @Schema(description = "邮箱")
    private String email;
    @Schema(description = "是否锁定")
    private String isLocked;
    @Schema(description = "最后登录时间")
    private Date lastLogin;
    @Schema(description = "密钥")
    private String secretKey;
    @Schema(description = "创建用户")
    private String createUser;
    @Schema(description = "创建时间")
    private Date createDatetime;
    @Schema(description = "更新用户")
    private String updateUser;
    @Schema(description = "更新时间")
    private Date updateDatetime;
    @Schema(description = "用户角色")
    private Integer userRole;
    @Schema(description = "是否为管理员")
    private String isAdmin;
    @Schema(description = "身份证号")
    private String idCardNo;
    @Schema(description = "人脸签名")
    private String faceSign;
    @Schema(description = "区域")
    private String district;
    @Schema(description = "头像")
    private String avatar;
    
    // ========== 查询返回字段 ==========
    @Schema(description = "岗位名称", accessMode = Schema.AccessMode.READ_ONLY)
    private String poistionName;  // 保持与数据库字段一致，虽然有拼写错误
    @Schema(description = "组织名称", accessMode = Schema.AccessMode.READ_ONLY)
    private String organizationName;
    @Schema(description = "角色名称", accessMode = Schema.AccessMode.READ_ONLY)
    private String roleName;
    @Schema(description = "角色代码", accessMode = Schema.AccessMode.READ_ONLY)
    private String roleCode;
}

